package com.wutao.panzh.admin.mapper;

import com.panzh.entity.FoodItem;
import com.panzh.entity.index.IndexFoodItem;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface FoodItemMapper extends Mapper<FoodItem>{

    List<FoodItem> selectFroSearch(@Param("keyword") String keyword);

    String selectImagSrcByFoodItemId(@Param("foodItemId")String foodItemId);

    void insertImagSrcByFoodItemId(@Param("imagSrc")String imagSrc, @Param("foodItemId")String foodItemId);

    void updateImagSrcByFoodItemId(@Param("imagSrc")String imagSrc, @Param("foodItemId")String foodItemId);

    void deleteFoodImage(@Param("foodItemId")String foodItemId);

    /**
     * 前端页面相关
     * @param classificationId 分类id
     * @return对应的food值
     */
    List<IndexFoodItem> selectIndexFoodFroSearch(@Param("classificationId") Integer classificationId);
}